package day4;

public class Number {
	private double num1;
	private double num2;
	public Number(double num1, double num2) {
		this.num1 = num1;
		this.num2 = num2;
	}
	
	public double getNum1() {
		return num1;
	}
	public double getNum2() {
		return num2;
	}
	
	public void add() {
		System.out.println(num1 + "与" + num2 + "和为：" + (num1 + num2));
	}
	public void sub() {
		System.out.println(num1 + "与" + num2 + "差为：" + (num1 - num2));
	}
	public void multi() {
		System.out.println(num1 + "与" + num2 + "乘积为：" + (num1 * num2));
	}
	public void div() {
		System.out.println(num1 + "与" + num2 + "商为：" + (num1 / num2));
	}
}
